package com.jiangnan.api.service

import com.jiangnan.entity.CommentRequest
import com.jiangnan.entity.CommentResponse
import com.jiangnan.entity.Res
import retrofit2.http.*

interface CommentApiService {
  @GET("comments")
  suspend fun listComments(
    @Query("page") page: Int,
    @Query("size") size: Int
  ): Res<List<CommentResponse>>

  @POST("comments")
  suspend fun postComment(@Body req: CommentRequest): Res<CommentResponse>

  @DELETE("comments/{id}")
  suspend fun deleteComment(@Path("id") id: Long): Res<Unit>
}
